I. Field of the Invention
The present invention relates generally to three dimensional graphics systems and more specifically to a system and method for viewing objects in three dimensions.
II. Background Information
Modern computer systems often provide the ability to view graphical objects in three dimensions. In three dimensional (xe2x80x9c3Dxe2x80x9d) graphical systems users view, on the two dimensional (xe2x80x9c2Dxe2x80x9d) space of a display (e.g. a monitor such as a CRT or flat screen display), a representation of 3D space. Objects in 3D space are projected onto a 2D view plane (also termed a projection plane) shown on the display. The image on the 2D view plane provides the user with a realistic view of the 3D space. The 2D projection may also be printed to hardcopy, i.e., paper.
In existing 3D graphics systems 3D objects, such as points, lines, polygons, etc., are located in a virtual 3D space. Each object in the 3D space may be defined as a collection of vectors, along with a position. The position includes x, y and z coordinates measured relative to an origin; the coordinates of the origin are (0, 0, 0). An object may have its own coordinate space: in such a case the definition of each vector is relative to the coordinate space of the object, and the position is added to the object vectors to place the object in the 3D space. An object may have a size which alters the scale of the object""s vectors when the object is placed in 3D space. Each object has an orientation relative to the origin, which defines a rotation around each of the x, y and z axes. Defining objects in a 3D space, and manipulating and moving objects in a 3D space relative to an origin, are well known. Other methods of defining 3D objects may be used.
In order that a 3D object may be viewed, it is projected onto a 2D view plane which may be displayed on a monitor. Using a projection, a processor forms images on the monitor constructed from multiple pixels, which depict 3D objects as seen in the view plane. To do so a viewpoint (also termed a vantage point, reference point, or center of projection) is defined, having a position and orientation (also termed a direction of view) relative to the origin. The viewpoint position and orientation is analogous to a camera position and angle. 3D objects are projected onto the display in a manner similar to how light is projected onto camera film. Using the viewpoint, the 3D space is mapped onto the 2D view planexe2x80x94a two dimensional grid comprising pixels, where each individual pixel in the 2D plane may correspond to numerous points in the 3D space. Each viewable point on each 3D object in the 3D space is mapped onto the view plane. This results in a two-dimensional image of a three-dimensional scene being represented on the display. In some cases only a portion of the view plane, the view plane window, is displayed on the monitor. 3D rendering of objects in 3D space onto a view plane window is well known in the art.
The visible portion of a 3D space is the frustum, a six sided 3D space. Referring to the figures in which like numerals indicate like elements, FIG. 1 is a diagram depicting a 3D graphics perspective projection frustum 82. Objects in 3D space 80 which are outside of the bounds of frustum 82 are not viewable. Objects closer to the viewpoint than near plane 84 or further from the viewpoint than far plane 86 are also not viewable. Objects within 3D space 80 are projected onto view plane 88; the view depicted on view plane 88 may be shown on a monitor for display to a user.
FIG. 2 is a diagram depicting a side view of a perspective projection frustum. To project objects onto view plane 88, viewpoint 90 is defined. The position and orientation of viewpoint 90 are defined relative to the origin of 3D space 80. When an object is shown in 3D space 80, the user perceives that the object resides somewhere between the near plane 84 and the far plane 86, and views the 3D space from the perspective of viewpoint 90.
According to one projection technique, a center of projection is defined and each point on an object is projected, i.e., cast or mapped, onto the view plane at the point where a line from the center of projection through the to-be-projected point intersects the view plane.
Some 3D objects in the 3D space may be obscured or otherwise difficult to view, given a certain position and orientation for the objects and viewpoint. At any one time a user can see only a portion of each 3D object viewable from the viewpoint. This is analogous to a camera or human eye, which due to its position and orientation in the world can only see a portion of viewable objects, and cannot view certain objects (e.g., distant objects) effectively. Because of xe2x80x9cperspective foreshortening,xe2x80x9d objects appear smaller on the view plane when they are further away from the view point, and thus occupy fewer pixels on the display. Objects may be obscured by other objects or may be oriented to hide certain features a user wishes to view. A user may desire a better view of a certain object in the 3D space. Thus the user may adjust the position or orientation of the object or the viewpoint so that the object is closer to or further from the viewpoint or is oriented differently relative to the viewpoint.
Implementing these actions may be awkward for a user, as sending commands for moving a viewpoint or moving and orienting a 3D object are not as natural as similar real world actions (e.g., walking toward an object or picking up and manipulating an object). In addition, a user may desire that such operations be automatic, requiring a minimum of user action, regardless of the ease of the 3D system interface.
Systems exist allowing the viewer of a 3D space to gesture on an object and have the viewpoint moved to view the object in 3D space. However, such systems reposition the viewpoint based on the position of the object, not on any characteristics of the object which may permit the object to be properly viewed. In such current systems, after the viewpoint has been moved a user may have to readjust the orientation or position of the viewpoint or object to optimally view the object.
It is therefore desirable to have a system and method which allow for the quick and easy movement of a viewpoint or a graphical object to provide an optimal view of an object. It is further desirable to have a system and method which allow for the manipulation of an object or viewpoint to be as automatic as possible, requiring as little user action as possible. Such a system and method should provide that each object may be optimally viewed based on characteristics of that object or on a definition of an optimal view of the object.
A method and system are disclosed for optimally viewing a three dimensional object in a three dimensional graphical space. According to an embodiment of the present invention, a graphical object in the three dimensional space has associated with it a set of data indicating an optimal vantage point for the graphical object.